// 组织架构相关API
import request from '@/utils/request'

// 查询企业的部门列表
const getDepartmentsAPI = () => request.get('/company/department')

// 根据ID删除部门
const delDepartmentsAPI = (id) => request.delete(`/company/department/${id}`)

// 新增部门
const addDepartmentsAPI = (data) => request.post('/company/department', data)

// 根据ID查询部门详情
const getDepartmentsDetailsAPI = (id) =>
  request.get(`/company/department/${id}`)

// 根据ID修改部门详情
const editDepartmentsDetailsAPI = (data) =>
  request.put(`/company/department/${data.id}`, data)

export {
  getDepartmentsAPI,
  delDepartmentsAPI,
  addDepartmentsAPI,
  getDepartmentsDetailsAPI,
  editDepartmentsDetailsAPI
}
